\subsection{Controller}
In this project there are three controllers: $continentController$, $countryController$, and $cityController$. On \cref{lst:countrycontroller} a snippet of the countryController can be seen. On line 1 the method $getCountry$ can be seen. This method takes an $id$ as parameter and returns a country object. On line 4 a call to the country model is made, which takes care of the actual database retrieval. 

\begin{code}{lst:countrycontroller}{Code snippet from countryController}
\begin{lstlisting}
    function getCountry($id)
    {
        $c = new CountryModel($this->db);
        return $c->getCountry($id);
    }

    function getAllCountriesOnContinent($continent_id)
    {
        $c = new CountryModel($this->db);
        return $c->getAllCountriesOnContinent($continent_id);
    }
\end{lstlisting}
\end{code}

